/* eslint-disable import/no-extraneous-dependencies */
import { configure, addDecorator } from "@storybook/vue";
import { withNotes } from "@storybook/addon-notes";
import Vue from "vue";
import store from "@/store";
import SuiVue from "semantic-ui-vue";
import "../../semantic/dist/semantic.min.css";
import VCalendar from "v-calendar";
import "v-calendar/lib/v-calendar.min.css";
import VueAMap from "vue-amap";
import { VuePlugin } from "vuera";
Vue.use(VuePlugin);
Vue.use(VCalendar, {
  firstDayOfWeek: 2 // ...other defaults
});
Vue.use(SuiVue);
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
  key: "62f8d08a3910e0c3d323e964192b12c3",
  plugin: ["AMap.Scale", "AMap.OverView", "AMap.ToolBar", "AMap.MapType"],
  v: "1.4.4"
});

// Install Vue plugins.
// 添加调试功能
process.env.NODE_ENV == "development" ? (Vue.config.devtools = true) : "";
const req = require.context("@/stories", true, /.stories.js$/);

function loadStories() {
  // You can require as many stories as you need.
  // like as require('../src/stories');
  req.keys().forEach(filename => req(filename));
}

addDecorator(withNotes);

configure(loadStories, module);
